from pathlib import Path

from sshtools.SshTool import SshTool
from tools.configmanager import config
from tools.file_tool import FileTool

if __name__ == "__main__":
    danji_ssh = SshTool(ssh_ip=config.get('dan_ji.ip'), ssh_user=config.get('dan_ji.user'),
                        ssh_pwd=config.get('dan_ji.pwd'))
    shellpath = Path(FileTool.get_shellscripts_dir()) / "1.txt"
    with open(shellpath, "r") as file:
        content = file.read()
    danji_ssh.run_command(content)
